/* cmd_motor_test.c */
#include "app_inc.h"

/* motorId, direction, speed. */
int32_t do_motor_set_turn(int32_t argc, char *argv[])
{
    Motor_SetTurnDirection((1U << atoi(argv[1])), (Motor_Direction_T)atoi(argv[2]));
    Motor_SetTrunSpeed((1U << atoi(argv[1])), atoi(argv[3]));

	printf("Motor set turn done.\r\n");
    return 0;
}

int32_t do_motor_get_quad_decoder(int32_t argc, char *argv[])
{
    printf("QuadDecoderA: %d\r\n", Motor_GetQuadDecoderValue(MOTOR_ID_A));
    printf("QuadDecoderB: %d\r\n", Motor_GetQuadDecoderValue(MOTOR_ID_B));
    Motor_ClearQuadDecoderValue(MOTOR_ID_A | MOTOR_ID_B);

	printf("Motor get quad_decoder done.\r\n");
    return 0;
}

/* EOF. */
